package com.hkd.user_service.api;

import com.hkd.common.api.ApiResponse;
import com.hkd.user_service.api.entity.SysMenu;
import com.hkd.user_service.api.fallback.SysMenuServiceImplFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author HKD
 * @date 2022/8/20 18:10
 */
//@Component
@FeignClient(name = "user-service",
        contextId = "SysMenuService",
        fallbackFactory =  SysMenuServiceImplFallback.class
)
public interface SysMenuService{

    @GetMapping("initMenu")
    ApiResponse<List<SysMenu>> initMenu();

    @PostMapping("addMenu")
    ApiResponse addMenu(@RequestBody SysMenu sysMenu,String userId);
}
